<!--
 * @Description: 组织商品管理组织商品详情模态框
 * @version: 电子名片2.0
 * @Author: 尹鑫
 * @Date: 2020-12-02 09:31:17
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-11-13 14:11:36
-->
<template>
  <el-dialog 
   :title="'组织商品详情'" 
   :close-on-click-modal="false" 
   :visible.sync="_showDetailsModal">
    <el-form :model="productDetails" :validate-on-rule-change="false">
      <el-form-item label="商品名称：" label-width="110px">{{ productDetails.productName }} </el-form-item>
      <el-form-item label="所属组织：" label-width="110px">{{ productDetails.companyName }} </el-form-item>
      <el-form-item label="价格：" label-width="110px">{{ productDetails.productPrice }} </el-form-item>
      <el-form-item label="详情介绍：" label-width="110px">
        <div v-html="productDetails.productDetail" />
      </el-form-item>
      <el-form-item label="商品图片：" label-width="110px">
        
        <el-image 
          v-for="(item, index) in productDetails.productUrl" 
          :key="index" style="margin-right:10px; width: 100px; height: 100px" 
          :src="item" :preview-src-list="productDetails.productUrl" />
      </el-form-item>
    </el-form>
    <div id="changeDialogStyle" class="el-dialog__footer" lot="footer">
      <el-button class="productCencleButton" @click="_showDetailsModal = false">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: '请传入模态框标题'
    },
    showDetailsModal: {
      type: Boolean,
      default: false
    },
    productDetails: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  computed: {
    _showDetailsModal: {
      get() {
        return this.showDetailsModal
      },
      set(value) {
        this.$emit('update:showDetailsModal', value)
      }
    }
  },
  methods: {
    cancelModal() {
      this._showDetailsModal = false
    }
  }
}
</script>
<style lang="scss" scoped>
  ::v-deep .el-dialog{
    max-height: 80%;
    overflow: auto;
  }
  .rejectModal1 {
    top: 50%;
    transform: translateY(-50%);
    width: 800px;
    vertical-align: middle;
    background-color: #FFFFFF;
    border-radius: 4px;
    border: 1px solid #e6ebf5;
    font-size: 18px;
    -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    text-align: left;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    padding-bottom: 10px;
  }
  .rejectModal1 .el-dialog__header{
    background-color: rgba(240, 242, 245, 1);
    padding: 15px;
    padding-bottom: 14px;
    height: 43px;
  }
  .rejectModal1 .el-dialog__header .el-dialog__title{
    padding-left: 0;
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1;
    color: #303133;
  }
  .rejectModal1 .el-dialog__header .el-dialog__headerbtn{
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
  }
  .rejectModal1 .el-dialog__footer{
    padding:5px 15px 0;
  }
  .rejectModal1 .el-dialog__body{
   height: 500px;
   overflow-y: scroll;
  }
  .productDetailItem{
    padding: 20px 0 10px 40px;
  }
  .detailedIntroduction{
    display: inline-block;
    width: 500px;
  }
  .imglist{
    display: inline-block;
    position: absolute;
  }
  #changeDialogStyle{
    padding: 0px;
  }
</style>
